package net.kem.android.positioner.responsehandler;

import org.xml.sax.SAXException;

/**
 *
 <message>
	<phoneNumber>0507362270</phoneNumber>    <!-- for debug purposes only -->
	<idFavorite>1</idFavorite> <!-- Integer. ID of the new favorite -->
	<status>0</status>         <!-- Integer. 0 if the favorite was deleted successfully. -->
	<descr>bla.bla</descr>     <!-- Optional string. Contains error description if status != 0 --> 
 </message>
 * @author Zhenya
 *
 */
public class AddDeleteUpdatePOIResponseHandler extends ResponseHandler {
	private int poiId;

	@Override
	public void endElement(String uri, String localName, String qName) throws SAXException {
		if(localName.equals("idFavorite")) {
			poiId = Integer.parseInt(currentValue);
		} else {
			super.endElement(uri, localName, qName);			
		}
	}

	public int getPoiId() {
		return poiId;
	}
}